package com.byzx.wine.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.byzx.wine.dao.FranchiseeMapper;
import com.byzx.wine.jdbcdao.FranChiseeDao;
import com.byzx.wine.po.Franchisee;
import com.byzx.wine.service.IFranchiseeService;
import com.byzx.wine.util.Page;
@Service
public class FranchiseeService implements IFranchiseeService {
	@Autowired
	private FranchiseeMapper Franchisee;
	@Autowired
	private FranChiseeDao fcd;

	

	@Override
	public int insert(Franchisee record) {
		// TODO Auto-generated method stub
		return Franchisee.insert(record);
	}

	@Override
	public Franchisee selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return Franchisee.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKey(Franchisee record) {
		// TODO Auto-generated method stub
		return Franchisee.updateByPrimaryKey(record);
	}

	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return Franchisee.deleteByPrimaryKey(id);
	}

	@Override
	public Page<Map<String, Object>> findPage(Page<Map<String, Object>> page) {
		String sqlid = "com.byzx.wine.jdbcdao.FranChiseeDao.findAll";
		return fcd.findPage(sqlid, page);
	}
}
